<div class="dux-tools">
  <div class="bread-head">{$info.name}管理 <span class="small">可以添加或者修改{$info.name}</span> </div>
  <br>
  <div class="tools-function clearfix">
    <div class="float-left"> <a class="button button-small bg-main icon-list" href="__URL__/index/id-{$info.id}"> {$info.name}列表</a> </div>
    <?php if(model('user_group')->form_power($info['table'],'add')){ ?>
    <div class="button-group float-right"> <a class="button button-small bg-dot icon-plus dropdown-toggle"> 添加 <span class="downward"></span></a>
      <ul class="drop-menu pull-right">
        <li><a href="__URL__/add/id-{$info.id}">{$info.name}添加</a></li>
      </ul>
    </div>
    <?php } ?>
  </div>
</div>
<div class="admin-main"> 
  <!--管理员列表-->
  <div class="panel dux-box">
    <div class="table-responsive">
      <table id="table" class="table table-hover ">
        <tbody>
          <tr>
            <th width="80">编号</th>
            <!--foreach:{$field_list $vo}-->
            <th width="*">{$vo.name}</th>
            <!--{/foreach}-->
            <th width="150">操作</th>
          </tr>
          <!--foreach:{$list $vo}-->
          <tr>
            <td>{$vo.id}</td>
             <!--foreach:{$field_list $model}-->
            <td><?php
                if($model['admin_html']<>''){
                eval(html_out(str_replace('{content}', $vo[$model['field']] ,$model['admin_html'])));
                }else{
                echo model('expand_model')->get_list_model($model['type'],$vo[$model['field']],$model['config']);
                }
        		?>
        	</td>
            <!--{/foreach}-->
            <td>
             <?php if(model('user_group')->form_power($info['table'],'edit')){ ?>
            <a href="__URL__/edit/id-{$vo.id}-fid-{$info.id}" class="button bg-blue button-small icon-pencil" title="修改"></a>
            <?php } ?>
            <?php if(model('user_group')->form_power($info['table'],'del')){ ?>
            <a class="button bg-red button-small icon-trash-o js-del" href="javascript:void(0);" onclick="del('{$vo.id}',this)" title="删除"></a>
            <?php } ?></td>
          </tr>
          <!--{/foreach}-->
        </tbody>
      </table>
    </div>
  </div>
</div>
<script>
//删除
function del(id,obj) {
	var obj;
	ajaxpost({
		name:'确定要删除此记录？',
		url:"__URL__/del",
		data:{id: id,fid: {$info.id}},
		tip:1,
		success:function(){
			$(obj).parent().parent().remove();
		}
	});
}
</script>